const path = require('path')
const resolve = dir => path.join(__dirname, dir)
module.exports = {
  publicPath: './',
  outputDir: 'backgroundManagement',
  assetsDir: 'static',
  indexPath: 'index.html',
  runtimeCompiler: true,
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src'))
  },
  devServer: {
    open: true,
    host: '0.0.0.0',
    port: 80,
    hotOnly: false,
    https: true,
    proxy: { // 配置跨域
      '/api': {
        target: 'https://hfaisccenter.com', // 源地址
        changeOrigin: true, // 改变源
        ws: true, // 是否代理websockets
        secure: false
      }
    },
    before: app => {},
    disableHostCheck: true
  }
}
